package com.lzcu.maoyan.maoyanweb.mapper;

import com.lzcu.maoyan.maoyanweb.pojo.MovieBoxOfficePojo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 票房
 *
 * @author WangLiang
 * @date `2024/4/22`
 */
@Mapper
public interface BoxOffice {
    /**
     * 按电影名称查询
     *
     * @param name 电影名
     * @return
     */
    List<MovieBoxOfficePojo> selectName(String name);

    List<MovieBoxOfficePojo> selectNames(String name);

    /**
     * 查询票房最高的20部电影
     *
     * @return
     */
    List<Map<String, Object>> selectMaxTotalSessions();

    /**
     * 春节期间票房前五详细数据
     *
     * @param movieName
     * @param upDay
     * @return
     */
    List<MovieBoxOfficePojo> selectTopMovie(String movieName, int upDay);
}
